home *** CD-ROM | disk | FTP | other *** search
/ Mastering Web Site Development / Microsoft Mastering Web Site Development (Microsoft) (1997).iso / Labs / StateUFinal / getfeedback.asp < prev    next >
Text File  |  1997-04-24  |  3KB  |  76 lines

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <!--METADATA TYPE="DesignerControl" startspan
  3.     <OBJECT ID="Include1" WIDTH=150 HEIGHT=23
  4.      CLASSID="CLSID:F602E725-A281-11CF-A5B7-0080C73AAC7E">
  5.         <PARAM NAME="_Version" VALUE="65536">
  6.         <PARAM NAME="_ExtentX" VALUE="3175">
  7.         <PARAM NAME="_ExtentY" VALUE="508">
  8.         <PARAM NAME="_StockProps" VALUE="0">
  9.         <PARAM NAME="Source" VALUE="adovbs.inc">
  10.     </OBJECT>
  11. -->
  12. <!--#INCLUDE FILE="adovbs.inc"-->
  13. <!--METADATA TYPE="DesignerControl" endspan-->
  14. <% frmResponse = request("response") %>
  15. <% frmEase = request("ease") %>
  16. <% frmInteractive = request("interactive") %>
  17. <% frmUseful = request("useful") %>
  18. <% on error resume next
  19.  
  20.    '-- Establish Connection to Database
  21.    Set conn = Server.CreateObject("ADODB.Connection")
  22.    conn.ConnectionTimeout = Session("StateU_ConnectionTimeout")
  23.    conn.CommandTimeout = Session("StateU_CommandTimeout")
  24.    conn.Open Session("StateU_ConnectionString"), _
  25.       Session("StateU_RuntimeUserName"), _
  26.       Session("StateU_RuntimePassword")
  27.  
  28.    '-- Add feedback from client as new record
  29.     strSQL = "INSERT INTO feedback " & _
  30.        "(Response, Useful, Interactive, Ease)" & _
  31.        " VALUES (" & frmResponse & "," & frmUseful & _
  32.        "," & frmInteractive & "," & frmEase & ")"
  33.     conn.execute strSQL
  34.  
  35.    '-- Check that record was added successfully
  36.    if err.number <> 0 then
  37.       session("ErrorTitle") = "Feedback Form"
  38.       session("ErrorText") = "The feedback could not be entered because of the following unexpected error:<p>"&err.description
  39.       response.redirect "error.asp"
  40.    end if
  41. %>
  42. <HTML>
  43. <HEAD>
  44. <meta name="GENERATOR" content="Microsoft Developer Studio">
  45. <meta http-equiv="Content-Type"
  46. content="text/html; charset=iso-8859-1">
  47. <title>Get Feedback Active Server Page</title>
  48. <link rel="STYLESHEET" href="Stylesheets/Grid/Style2.css">
  49. </head>
  50.  
  51. <body background="Images/Grid/Background/Back2.jpg"
  52. bgcolor="White">
  53. <basefont face="Arial, Helvetica, sans-serif">
  54.  
  55.  
  56. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  57.     <tr>
  58.         <th align="Left" nowrap bgcolor="Silver"
  59.         background="./Images/Grid/Navigation/Nav1.jpg"> <font
  60.         size="6"> Feedback </font> </th>
  61.     </tr>
  62.     <tr>
  63.         <td bgcolor="#FFFFCC"> <font size="-1">  
  64.         Feedback recorded</font> </td>
  65.     </tr>
  66. </table>
  67.  
  68. <p>
  69. Your feedback has been recorded and will help us make improvements
  70. to this website in the future.
  71. <p>
  72. Thank you!
  73.  
  74. </BODY>
  75. </HTML>
  76.